#CACHE{0}
    <B_products>
    <input type="hidden" id="num_products" name="num_products" value="#TOTAL_BOUCLE" />
    <table width="100%" cellpadding="0" cellspacing="1">
	   <tbody>                            
            <tr>
                <th><:alohacart:photo:></th>
                <th><:ecatalogue:sku:></th>
                <th width="60%"><:alohacart:titre:></th>
	            <th><:alohacart:quantity:></th>
                [(#CONFIG{alohacart/output_num_in_package_column}|?{
                    <th><:ecatalogue:num_in_package:></th>
                })]
                <th><:alohacart:price_one:></th>
                <th><:alohacart:price:></th>
                <th></th>
            </tr>
    <BOUCLE_products(ARTICLES spip_ecatalogue_products){statut=publie}{id_article IN #PRODUCTS_IDS}>
    <tr class="[(#IS_COMPOSITE|=={1}|?{composite_head})]">
        <td>
            [<a href="IMG/(#LOGO_ARTICLE|fichier)" rel="gallery">
                [(#LOGO_ARTICLE|image_reduire{50})]
            </a>]
        </td>
        <td>#SKU</td>
        <td>
            <a target="_blank" href="#URL_ARTICLE">#TITRE</a>
        </td>									
        <td>
        <input class="quantity" type="text" name="products[#ID_ARTICLE][quantity]" value="[(#PRODUCTS|table_valeur{#ID_ARTICLE})]"
               style="width: 70px;"  data-id_product="#ID_ARTICLE" />
                    <:alohacart:pcs:>
        </td>
        [(#CONFIG{alohacart/output_num_in_package_column}|?{
            <td>
            [(#SOLD_IN_PACKAGES|?{
                #NUM_IN_PACKAGE <:alohacart:pcs:>                    
            })]
            </td>      
        })]
        <td>
            #ECATALOGUE_CURRENCY_SIGN{'', sign_pre}
            #ECATALOGUE_PRODUCT_PRICE{#ID_ARTICLE, CURRENT}&nbsp; 
            #ECATALOGUE_CURRENCY_SIGN{'', sign_after}
        </td>                
		<td> 
            #ECATALOGUE_CURRENCY_SIGN{'', sign_pre}            
            [(#PRODUCTS_PRICES|table_valeur{#ID_ARTICLE})]            
            #ECATALOGUE_CURRENCY_SIGN{'', sign_after} 
        </td>
        <td>
            <center>                
                <a class="delete_link" href="javascript:;" data-id_product="#ID_ARTICLE" >
                    <:alohacart:delete:>
                </a>                
            </center>
        </td>
    </tr>
    [(#REM) Output components of composite product]
    <BOUCLE_test_composite(CONDITION){si #IS_COMPOSITE|=={1}}>
        <INCLURE{fond=formulaires/alohacart_cart_order/components,id_article=#ID_ARTICLE,products=#PRODUCTS,in_cart=yes}>
    </BOUCLE_test_composite> 
        
    </BOUCLE_products>
    </tbody>
    </table>
    <strong><:alohacart:cart_quantity:>: </strong> #ALOHACART_CART_QUANTITY <:alohacart:pcs:><br />
    [(#REM) С целью оптимизации один раз возьмем знаки валюты и запишем их в переменные. Берем текущую выбранную/заданную валюту]
    #SET{currency_sign_pre, #ECATALOGUE_CURRENCY_SIGN{'', sign_pre}}
    #SET{currency_sign_after, #ECATALOGUE_CURRENCY_SIGN{'', sign_after}}
    <strong><:alohacart:total_price:>: </strong>   
    
    #GET{currency_sign_pre} #ALOHACART_CART_PRICE #GET{currency_sign_after}
    <br />
    [<strong><:alohacart:shipping_cost:>:</strong> #GET{currency_sign_pre} (#SHIPPING_COST) #GET{currency_sign_after} <br />]
    [<strong><:alohacart:order_total_price:>:</strong> #GET{currency_sign_pre} (#ORDER_TOTAL_PRICE) #GET{currency_sign_after} <br />]
    </B_products>
    
<?php if (lire_config('alohacart/add_spinner')) { ?>
        <script src="#CHEMIN{includes/smartspin/smartspinner.js}" type="text/javascript"></script>
        <link href="#CHEMIN{includes/smartspin/smartspinner.css}" rel="stylesheet" type="text/css" />
<?php } ?>
 <script>
    var id_product_change_quantity = '#ENV{id_product_change_quantity}';
    
    jQuery('.quantity').each(function(){
        <?php if (lire_config('alohacart/add_spinner')) { ?>
        jQuery(this).spinit({min:0/*,max:10*/,stepInc:1,height:22,initValue:jQuery(this).val() });
        <?php } ?>
        if (jQuery(this).attr('data-id_product') == id_product_change_quantity)
            jQuery(this).focus();
    });
    
 </script>        